﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;

namespace DataAccess
{
    public class InfoChonDeTai
    {
        private string _MaDT;

        public string MaDT
        {
            get { return _MaDT; }
            set { _MaDT = value; }
        }
        private string _MSSV;

        public string MSSV
        {
            get { return _MSSV; }
            set { _MSSV = value; }
        }
        private string _MaGVPB1;

        public string MaGVPB1
        {
            get { return _MaGVPB1; }
            set { _MaGVPB1 = value; }
        }
        private string _MaGVPB2;

        public string MaGVPB2
        {
            get { return _MaGVPB2; }
            set { _MaGVPB2 = value; }
        }
        private string _MaGVHD;

        public string MaGVHD
        {
            get { return _MaGVHD; }
            set { _MaGVHD = value; }
        }
        private string _MaChonDT;

        public string MaChonDT
        {
            get { return _MaChonDT; }
            set { _MaChonDT = value; }
        }
        public InfoChonDeTai()
        { }
        public static List<InfoChonDeTai> DanhSachChonDeTai()
        {
            return CBO.FillCollection<InfoChonDeTai>(DataProvider.Instance.ExecuteReader("SelectChonDeTaiAll"));
        }
        //Them mot chon de tai
        public static int AddChonDeTai(InfoChonDeTai infochondetai)
        {
            return DataProvider.Instance.ExecuteNonquery("AddChonDeTai", infochondetai.MaDT, infochondetai.MSSV, infochondetai.MaGVPB1, infochondetai.MaGVPB2, infochondetai.MaGVHD, infochondetai.MaChonDT);
        }
    }
}
